# -*- coding:utf-8 -*-
# @time    : 2021/9/5 6:08
# @Author  : zhang jin xia
# @Filename: PyCharm

from appium.webdriver.common.mobileby import MobileBy
from app_po_project.app_project.page.base_page import BasePage


class AddMemberPage(BasePage):
    # 提取元素
    _addmember_menual_ele = (MobileBy.XPATH, "//*[@text='手动输入添加']")

    def click_addmember_menual(self):
        from app_po_project.app_project.page.edit_member_page import EditMemberPage

        # 点击手动添加
        self.find_and_click(*self._addmember_menual_ele)

        # 跳转添加成员编辑页面
        return EditMemberPage(self.driver)

    def get_tip(self):
        # 获取tip提示
        result=self.driver.find_element(MobileBy.XPATH, "//*[@class='android.widget.Toast']").text
        # 返回结果
        return result


